﻿<UserControl x:Class="Eaglight.Toc"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:Eaglight"
    xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls">
    
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.Resources>
            <DataTemplate x:Name="MapLayersTemplate">
                <StackPanel Orientation="Horizontal">
                    <CheckBox  IsChecked="{Binding Visible, Mode=TwoWay}"  VerticalAlignment="Center"/>
                    <Slider Margin="-5,0,0,0" Minimum="0" Maximum="1" Width="30" Value="{Binding Opacity, Mode=TwoWay}" Height="18" VerticalAlignment="Center"/>
                    <TextBlock Text="{Binding ID, Mode=OneWay}"  Margin="5,0,0,0" VerticalAlignment="Center"/>
                </StackPanel>
            </DataTemplate>

            <DataTemplate x:Name="DynamicLayerTemplate">
                <StackPanel Orientation="Horizontal">
                    <CheckBox x:Name="chkVisible" IsChecked="{Binding DefaultVisibility, Mode=OneWay}" Tag="{Binding ID, Mode=OneWay}"  Checked="chkVisible_Checked" Unchecked="chkVisible_Unchecked"/>
                    <TextBlock Text="{Binding Name, Mode=OneWay}" Margin="5,0,0,0"/>
                </StackPanel>
            </DataTemplate>
        </Grid.Resources>

        <controls:TreeView x:Name="tvMain" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="0"/>
            
        
    </Grid>
</UserControl>
